

<div class="context-menu">
	<ul>
		<li><?php echo $html->link('Add category', '/admin/categories/add'); ?></li>
	</ul>
</div>

<h3>List of categories</h3>	

<p class="tip">
	You can order categories by drag and drop.
</p>

<ul id="category_list">
<?php foreach($categories as $category): ?>

	<li id="category_<?php echo $category['Category']['id']; ?>">
		<?php echo $category['Category']['title']; ?> - 
		(<?php echo $category['Category']['pages_count']; ?>) Pages -
		<?php echo $html->link('Edit', '/admin/categories/edit/'.$category['Category']['id']); ?>
		<?php echo $html2->link('Delete','/admin/categories/delete/'.$category['Category']['id'], null, 'Are you sure to delete this category?') ?>
	</li>

<?php endforeach; ?>
</ul>

<?php echo $ajax->sortable('category_list', 
				array('url' => '/admin/categories/order', 
						'complete'=>"new Effect.Highlight('category_list');")); ?>
